<template>
  <el-dialog title="历史记录" :visible.sync="openWarehouseInOverviewDelRecord" width="1200px" append-to-body :destroy-on-close="true" :before-close="beforeClose">
    <el-table
      v-loading="loading"
      row-key="dzid"
      :data="warehouseOverviewRecordDeleted"
    >
      <af-table-column prop="pzbh" label="单据号" align="center" class-name="small-padding fixed-width"  fixed="left"></af-table-column>
      <af-table-column prop="prrq" label="创建时间"  fixed="left"></af-table-column>
      <af-table-column prop="rsopmc" label="创建人" ></af-table-column>
      <af-table-column prop="spjs" label="件数" ></af-table-column>
      <af-table-column prop="spjsl" label="单重(KG)" ></af-table-column>
      <af-table-column prop="spsl" label="重量(吨)" ></af-table-column>
      <af-table-column prop="ssrqida" label="业务日期" ></af-table-column>
      <af-table-column prop="spckmc" label="仓库" ></af-table-column>
      <af-table-column prop="ckcw" label="仓位" ></af-table-column>
      <af-table-column prop="itbz" label="备注"  width="150" :show-overflow-tooltip="true"></af-table-column>
      <af-table-column prop="sptm" label="条码" ></af-table-column>
      <af-table-column prop="spzs" label="物品规格" ></af-table-column>
      <af-table-column prop="spmc" label="物品名称" ></af-table-column>
      <af-table-column prop="spcd" label="品牌" ></af-table-column>
      <af-table-column prop="spbh" label="批号" ></af-table-column>
      <af-table-column prop="spgh" label="柜号" ></af-table-column>
      <af-table-column prop="ssrqid" label="入仓日期" ></af-table-column>
      <af-table-column prop="allName" label="所有者" ></af-table-column>
      <af-table-column prop="wpggA" label="纱支" ></af-table-column>
      <af-table-column prop="wpggB" label="工艺" ></af-table-column>
      <af-table-column prop="wpggC" label="工序" ></af-table-column>
      <af-table-column prop="wpggD" label="用途" ></af-table-column>
      <af-table-column prop="wpggE" label="产地" ></af-table-column>
      <af-table-column prop="wpggF" label="漂染性" ></af-table-column>
      <af-table-column prop="wpggG" label="生产日期" ></af-table-column>
      <af-table-column prop="wpggH" label="颜色" ></af-table-column>
      <af-table-column prop="delm" label="	删除人" ></af-table-column>
      <af-table-column prop="deldate" label="	删除日期" ></af-table-column>
    </el-table>
     <pagination
        v-show="total>0"
        :total="total"
        :page.sync="pageNum"
        :limit.sync="pageSize"
        @pagination="getList"
      />
  </el-dialog>
</template>

<script>
import { warehouseInOverviewRecordDeleted } from "@/api/storage/commonGoods/warehouseIn";

export default {
  name: "WarehouseInOverviewDelRecord",
  data() {
    return {
      // 显示搜索条件
      showSearch: true,
      //表格加载
      loading: true,
       //弹窗状态
      openWarehouseInOverviewDelRecord: false,
      formQuery:{},
      warehouseOverviewRecordDeleted:[],
      //页数
      pageSize: 10,
      //页码
      pageNum:1,
      // 总条数
      total: 0,
    };
  },
  methods: {
    /**获取已删除信息 */
    getList() {
      this.loading=true
      warehouseInOverviewRecordDeleted(this.formQuery, {pageNum:this.pageNum, pageSize:this.pageSize}).then(response => {
        this.warehouseOverviewRecordDeleted = this.handleTree(response.rows, "dzid");
        this.total = response.total;
        this.loading = false
      });
    },
    /**改变窗口状态 */
    changeWarehouseInOverviewDelRecord() {
      this.openWarehouseInOverviewDelRecord = !this.openWarehouseInOverviewDelRecord;
    },
    /**关闭弹窗 */
    beforeClose(done) {
      this.changeWarehouseInOverviewDelRecord()
      done()
    },
    /**打开弹窗 */
    open() {
      this.changeWarehouseInOverviewDelRecord()
      this.getList()
    }
  }
};
</script>
